<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/vue.js"></script>
    <script src="/js/axios.js"></script>
</head>
<body>

    <div id="d">
        <h3>{{info}}</h3>
        <button @click="get">获取数据</button>
    </div>

    <script>
        new Vue({
            el:"#d",
            data:{
                info:''
            },
            methods:{
                get(){
                    axios.get('http://localhost:8080/hello').then(
                        rs=>{
                            this.info=rs.data
                        }
                    );
                }
            }
        })
    </script>
</body>
</html>